<?php
namespace Tbf\Error;
use Tbf\Util\HttpUtil;
/**
 * @deprecated
 */
class ExceptionTo500Handle extends Handle{
    function handle(){
        set_exception_handler(array($this,'exceptionHandler'));
    }
    function exceptionHandler($e){
        echo $e->getTraceAsString();
        HttpUtil::sendResponseCode(500);
        throw $e;
    }
}
